<?php $this->load->view('layout/header') ?>
<div class="supplier-left-page">
    <div class="supplierHeader-likeHead clearfix">
        <ul>
            <li>
                <a target="iFrameContent" href="javascript:;">
                    <img src="<?php echo $this->personalPhoto ? $this->config->show_image_url($this->personalPhoto) : '/skins/images/photo0.jpg' ?>" class="supplierHeader-Park">
                </a>
            </li>
            <li class="supplierHeader-xinxi">
                <h4><?php echo $this->aliasName;?></h4>
                <p>资深产品供应商</p>
                <a target="iFrameContent" href=<?php echo site_url('accountinfo/personal')?>>
                    <i class="glyphicon glyphicon-cog"></i>
                </a>
            </li>
        </ul>
    </div>
    <ul class="nav-navigate">
        <li>
            <a target="iFrameContent" href="<?php echo site_url('tourismgoodsbase/grid'); ?>">
                <i class="glyphicon glyphicon-home"></i>
                <span>首页</span>
            </a>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-book"></i>
                <span>站点管理</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu systemSetting-4">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('accountinfo/storeInfo')?>">
                        <i class="glyphicon glyphicon-sunglasses"></i>
                        <span>站点信息</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('advert/grid')?>">
                        <i class="glyphicon glyphicon-book"></i>
                        <span>幻灯片管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismheadline/grid')?>">
                        <i class="glyphicon glyphicon-phone"></i>
                        <span>站点公告</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismkeyword/grid')?>">
                        <i class="glyphicon glyphicon-search"></i>
                        <span>搜索推荐</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('providerguarantee/grid')?>">
                        <i class="glyphicon glyphicon-tree-deciduous"></i>
                        <span>消费保障</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-th-list"></i>
                <span>商品管理</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu systemSetting-4">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismprovidercategory/grid')?>">
                        <i class="glyphicon glyphicon-align-left"></i>
                        <span>类别管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismgoodsbase/grid')?>">
                        <i class="glyphicon glyphicon-th-large"></i>
                        <span>宝贝管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismorder/grid')?>">
                        <i class="glyphicon glyphicon-list-alt"></i>
                        <span>订单管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismorderrefund/grid')?>">
                        <i class="glyphicon glyphicon-transfer"></i>
                        <span>退换货管理</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-fire"></i>
                <span>营销管理</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu systemSetting-4">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('user/grid')?>">
                        <i class="glyphicon glyphicon-compressed"></i>
                        <span>账号管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismtemplet/grid')?>">
                        <i class="glyphicon glyphicon-plane"></i>
                        <span>运费模板</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('user_credit/grid')?>">
                        <i class="glyphicon glyphicon-glass"></i>
                        <span>授信管理</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('tourismreviews/grid')?>">
                        <i class="glyphicon glyphicon-comment"></i>
                        <span>评价管理</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-globe"></i>
                <span>社区管理</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu systemSetting-4">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('help_issue/grid')?>">
                        <i class="glyphicon glyphicon-comment"></i>
                        <span>常见问题</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('feedback/grid')?>">
                        <i class="glyphicon glyphicon-list-alt"></i>
                        <span>意见反馈</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-user"></i>
                <span>账户管理</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('accountinfo/personal')?>">
                        <i class="glyphicon glyphicon-cog"></i>
                        <span>个人信息</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('accountinfo/accountRecord')?>">
                        <i class="glyphicon glyphicon-credit-card"></i>
                        <span>账户信息</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('accountinfo/securitySettings')?>">
                        <i class="glyphicon glyphicon-lock"></i>
                        <span>安全设置</span>
                    </a>
                </li>
            </ul>
        </li>
        <li>
            <a href="javascript:;">
                <i class="glyphicon glyphicon-bullhorn"></i>
                <span>消息</span>
                <i class="glyphicon glyphicon-menu-left glyphicon-dwing"></i>
            </a>
            <ul class="sub-menu">
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('mailbox/receiveBox')?>">
                        <i class="glyphicon glyphicon-envelope"></i>
                        <span>站内信</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('mailbox/systemMessage')?>">
                        <i class="glyphicon glyphicon-bell"></i>
                        <span>系统通知</span>
                    </a>
                </li>
                <li>
                    <a target="iFrameContent" href="<?php echo site_url('mailbox/orderMessage');?>">
                        <i class="glyphicon glyphicon-warning-sign"></i>
                        <span>订单信息</span>
                    </a>
                </li>
            </ul>
        </li>
    </ul>
</div>
<?php $this->load->view('layout/footer') ?>
<script type="text/javascript">
    $(document).ready(function(){
        //左边栏 menu
        var navNavigateMenu = function () {
            $('.supplier-left-page ul.nav-navigate').on('click', 'li > a', function(event){
                if ($(this).next().hasClass('sub-menu') == false) {
                    return;
                }
                var submenu = $(this).next('ul.sub-menu');
                if (submenu.is(':visible')) {
                    $(this).children('i.glyphicon-dwing').removeClass('glyphicon-menu-down').addClass('glyphicon-menu-left');
                    submenu.slideUp(200, function (){});
                } else {
                    //其它收起操作
                    $(this).parents('li').siblings().find('a i.glyphicon-dwing').removeClass('glyphicon-menu-down').addClass('glyphicon-menu-left');
                    $(this).parents('li').siblings().find('ul.sub-menu').slideUp(200, function (){});

                    $(this).children('i.glyphicon-dwing').removeClass('glyphicon-menu-left').addClass('glyphicon-menu-down');
                    submenu.slideDown(200, function (){});
                }
            });
        };
        navNavigateMenu();

        //左边菜单栏定位
        function urlString() {
            var urlJoin = [];
            var arrayUrl = window.location.pathname.split('/');
            if (arrayUrl.length >= 2) {
                urlJoin = urlJoin.concat(arrayUrl[0], arrayUrl[1]);
            } else {
                urlJoin = ['home', 'index']; //设置随意默认值，基本上无效，为保证代码正确性，保留。
            }
            return urlJoin.join('/')+'/';
        }

        $('ul.nav-navigate li a').each(function(index, element) {
            var href = $(this).attr('href');
            var split = urlString();
            if (href.indexOf(split) > 0 && split != '//') {
                var parentsLi = $(element).parents('li');
                parentsLi.addClass('active').parent('ul.sub-menu').show();
                parentsLi.find('i.glyphicon-dwing').addClass('glyphicon-menu-down');
            }
        });

        if ($('ul.nav-navigate ul.sub-menu li.active').size() > 1) { //判断如果存在多个定位，则移除选中
            $('ul.sub-menu li.active').removeClass('active');
        }
    });
</script>